package com.xch.bean;

import java.sql.Timestamp;
import java.util.Objects;

public class Courier {
    private int id;
    private String courierName;
    private String courierPhone;
    private String courierId;
    private String password;
    private int courierExpressNum;
    private Timestamp courierRegisterTime;
    private Timestamp courierLoginTime;

    public Courier(String courierName, String courierPhone, String courierId, String password) {
        this.courierName = courierName;
        this.courierPhone = courierPhone;
        this.courierId = courierId;
        this.password = password;
    }

    public Courier() {
    }

    public Courier(int id, String courierName, String courierPhone, String courierId, String password, int courierExpressNum, Timestamp courierRegisterTime, Timestamp courierLoginTime) {
        this.id = id;
        this.courierName = courierName;
        this.courierPhone = courierPhone;
        this.courierId = courierId;
        this.password = password;
        this.courierExpressNum = courierExpressNum;
        this.courierRegisterTime = courierRegisterTime;
        this.courierLoginTime = courierLoginTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Courier courier = (Courier) o;
        return id == courier.id && courierExpressNum == courier.courierExpressNum && Objects.equals(courierName, courier.courierName) && Objects.equals(courierPhone, courier.courierPhone) && Objects.equals(courierId, courier.courierId) && Objects.equals(password, courier.password) && Objects.equals(courierRegisterTime, courier.courierRegisterTime) && Objects.equals(courierLoginTime, courier.courierLoginTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, courierName, courierPhone, courierId, password, courierExpressNum, courierRegisterTime, courierLoginTime);
    }

    @Override
    public String toString() {
        return "Courier{" +
                "id=" + id +
                ", courierName='" + courierName + '\'' +
                ", courierPhone='" + courierPhone + '\'' +
                ", courierId='" + courierId + '\'' +
                ", password='" + password + '\'' +
                ", courierExpressNum=" + courierExpressNum +
                ", courierRegisterTime=" + courierRegisterTime +
                ", courierLoginTime=" + courierLoginTime +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCourierName() {
        return courierName;
    }

    public void setCourierName(String courierName) {
        this.courierName = courierName;
    }

    public String getCourierPhone() {
        return courierPhone;
    }

    public void setCourierPhone(String courierPhone) {
        this.courierPhone = courierPhone;
    }

    public String getCourierId() {
        return courierId;
    }

    public void setCourierId(String courierId) {
        this.courierId = courierId;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getCourierExpressNum() {
        return courierExpressNum;
    }

    public void setCourierExpressNum(int courierExpressNum) {
        this.courierExpressNum = courierExpressNum;
    }

    public Timestamp getCourierRegisterTime() {
        return courierRegisterTime;
    }

    public void setCourierRegisterTime(Timestamp courierRegisterTime) {
        this.courierRegisterTime = courierRegisterTime;
    }

    public Timestamp getCourierLoginTime() {
        return courierLoginTime;
    }

    public void setCourierLoginTime(Timestamp courierLoginTime) {
        this.courierLoginTime = courierLoginTime;
    }
}
